import axios from 'axios'
export let Mixin = {
  data() {
    return {
      loading: false,
    }
  },
  created() {
    this.loading = true
  },
  watch: {},
  computed: {},
  methods: {
    async loadJsonFile() {
      let result = await axios.get(`./json/${this.$options.name}.json`)
      this.$store.dispatch('fileConfig/setData', result.data)
      return result.data
    },
    nowJsonData() {
      let data = this.loadJsonFile()
      this.loading = false
      return data
    },
  },
}
